package com.lgCore.model;

/**
 * Created by by on 2020/11/9 14:57
 */
public enum SystemRegionEnum {
    GRAY("gray", "灰色服务"),
    NORMAL("normal", "正常服务");
    private String type;
    private String value;

    SystemRegionEnum(String type, String value) {
        this.type = type;
        this.value = value;
    }


    public void setType(String type) {
        this.type = type;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getType() {
        return type;
    }

    public String getValue() {
        return value;
    }
    public static SystemRegionEnum getOfType(String type){
        for(SystemRegionEnum systemRegionEnum : SystemRegionEnum.values()){
            if(systemRegionEnum.getType().equals(type)){
                return systemRegionEnum;
            }
        }
        //默认走正常
        return SystemRegionEnum.NORMAL;
    }
}
